﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;

namespace YGBookmark.Utils
{
    public static class ToolByStatic
    {
        public static Image BytesToImage(this byte[] bytes)
        {
            using (var stream = new MemoryStream(bytes))
            {
                return Image.FromStream(stream);
            }
        }

        public static string GetDtStr(this DateTime dt, string strFormat = "yyyy-MM-dd HH:mm:ss")
        {
            return dt.ToString(strFormat);
        }
    }
}
